package programOutput;

import java.awt.Cursor;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

import audit.AuditWriter;

import userInterface.GUIController;

import fileProcessing.ParsingException;
import fileProcessing.ProjectDirectories;
import main.Main;

public class ParsingOutput {

	public boolean toCSV,toExcel;
	public String delimiter = "";
	public static AuditWriter audit;
	
	public ParsingOutput(String delimiter,boolean toCSV,boolean toExcel) throws ParsingException{
		audit = AuditWriter.getAuditWriter();
		audit.writeToAudit("Outputting to csv...");
		GUIController.getMainPage().setStatus("Outputting to csv...\n");
		if(toCSV){
			Main.tCollection.outputToCSV(delimiter);
			//Main.rCollection.outputToCSV(delimiter);
			audit.writeToAudit("Finished output to csv");
			GUIController.getMainPage().setStatus("Finished output to csv\n");
			GUIController.getMainPage().progressBar.setValue(100);
			GUIController.getMainPage().parseFile.setEnabled(true);
			GUIController.getMainPage().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
			//System.out.println("Finished output to csv");
		}
		if(toExcel){
			
		}
		
	}
}
